﻿// <copyright file="CharWithPosition.cs" company="Codeplex project Eco.Contrib"> 
// The MIT License (MIT) 
// </copyright> 
// <author>Peter Buchmann</author> 

namespace Eco.Contrib
{
    using System.Globalization;

    /// <summary>
    /// CharWithPosition: Char with position
    /// </summary>
    internal class CharWithPosition
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CharWithPosition"/> class.
        /// </summary>
        /// <param name="charValue">The char value.</param>
        /// <param name="pos">The pos.</param>
        /// <param name="line">The line.</param>
        /// <param name="col">The col.</param>
        public CharWithPosition(char charValue, int pos, int line, int col)
        {
            this.Char = charValue;
            this.Pos = pos;
            this.Line = line;
            this.Col = col;
        }

        /// <summary>
        /// Gets the char.
        /// </summary>
        /// <value>
        /// The char.
        /// </value>
        public char Char { get; private set; }

        /// <summary>
        /// Gets the pos.
        /// </summary>
        /// <value>
        /// The pos.
        /// </value>
        public int Pos { get; private set; }

        /// <summary>
        /// Gets the line.
        /// </summary>
        /// <value>
        /// The line.
        /// </value>
        public int Line { get; private set; }

        /// <summary>
        /// Gets the col.
        /// </summary>
        /// <value>
        /// The col.
        /// </value>
        public int Col { get; private set; }

        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        //// public new string ToString()
        //// {
        ////     return this.Char.ToString() + string.Format(CultureInfo.CurrentCulture, " at Pos:{0} ({1},{2})", this.Pos, this.Line, this.Col);
        //// }
    }
}
